<!-- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<jsp:useBean id="now" class="java.util.Date" />
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<c:set var="ctx" value="<%=basePath%>" /> -->
<!DOCTYPE HTML >
<html>

<head>
  <base href="<%=basePath%>">
  <title>云净-透析准备</title>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <meta http-equiv="pragma" content="no-cache" />
  <meta http-equiv="cache-control" content="no-cache" />
  <meta http-equiv="expires" content="0" />
  <meta http-equiv="keywords" content="云净,透析单,透析记录" />
  <link href="image/yunjing/logo.ico" type="image/x-icon" rel="shortcut icon">
  <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css" />
  <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap-datetimepicker.min.css" />
  <style>
    a[title="站长统计"] {
      display: none;
    }

    * {
      padding: 0px;
      margin: 0px;
      font-family: "Microsoft YaHei", 微软雅黑, "MicrosoftJhengHei", 华文细黑, STHeiti, MingLiu;
      font-size: 14px;
    }

    body {
      background-color: #EFF2F6;
    }

    .tx_container {
      /* background-color: #EFF2F6; */
    }

    .tx_menue_ul {
      list-style-type: none;
      height: 40px;
      margin-bottom: 0px;
      background-color: #F3F3F1;
    }

    .tx_menue_ul>li {
      display: inline-block;
      text-align: center;
      font-size: 14px;
      line-height: 40px;
      width: 100px;
      background-color: #ffffff;
      margin-left: 30px;
    }

    .tx_content {
      background-color: #ffffff;
      padding: 8px 12px;
      margin: 18px 30px 0px 30px;
      min-width: 1180px;
    }

    .tx_yz_searchul {
      list-style-type: none;
    }

    .tx_yz_searchul>li {
      display: inline-block;
      width: 100%;
      height: 40px;
      line-height: 40px;
      margin: 5px 0px;
    }

    .tx_yz_searchword {
      display: inline-block;
      background-color: #EFF2F6;
      width: 80px;
      text-align: center;
      border-radius: 4px;
    }

    .tx_search_label {
      color: #4579C5;
      margin: 0px 30px;
      width: 60px;
      text-align: center;
      border-radius: 8px;
      height: 30px;
      line-height: 30px;
      background-color: #ffffff;
      font-weight: normal;
    }

    .tx_search_label_active {
      background-color: #4579C5;
      color: #ffffff;
    }

    .tx_select_period {
      display: inline-block;
      width: 100px;
      margin-left: 30px;
    }

    .tx_datetime_div {
      border: 1px solid #ddd;
      display: inline-block;
      margin: 0px 30px;
      height: 34px;
      line-height: 34px;
      padding-bottom: 5px;
      border-radius: 4px;
    }

    .tx_input_datetime {
      border: 0px;
      height: 30px;
      display: inline-block;
      width: auto;
      text-align: center;
      padding: 6px;
      width: 130px;
      -webkit-box-shadow: none;
      background-color: #fff !important;
    }

    .tx_daytime_typeul {
      list-style-type: none;
      display: inline-block;
    }

    .tx_daytime_typeul>li {
      display: inline-block;
      height: 40px;
      line-height: 40px;
      margin: 0px 15px;
      text-align: center;
    }

    #pbyztable {
      margin-bottom: 0px;
      border-bottom: 1px solid #ddd;
      border-top: 1px solid #ddd;
    }

    #pbyztable>thead>tr>td,
    #pbyztable>tbody>tr>td {
      text-align: center;
    }

    .tx_label_ul {
      list-style-type: none;
      height: 50px;
      margin-bottom: 0px;
      background-color: #ffffff;
    }

    .tx_label_ul>li {
      display: inline-block;
      text-align: center;
      font-size: 16px;
      line-height: 50px;
      margin: 0px;
      margin-right: 50px;
      padding: 0px 5px;
    }

    .tx_label_liactive {
      border-bottom: 3px solid #4579C5;
      color: #4579C5;
    }

    .tx_search_input {
      margin-left: 150px;
      height: 40px;
      border-radius: 20px;
      width: 250px;
      display: inline-block;
    }

    .tx_print_btn {
      background-color: #45c566;
      margin-left: 30px;
      height: 40px;
      color: #ffffff;
      width: 120px;
      border-radius: 20px;
    }

    .tx_peiyao_btn {
      background-color: #ed3945;
      margin-left: 30px;
      height: 40px;
      color: #ffffff;
      width: 120px;
      border-radius: 20px;
    }

    .tx_wxpush_btn {
      background-color: #02c3ce;
      margin-left: 30px;
      height: 40px;
      color: #ffffff;
      width: 120px;
      border-radius: 20px;
    }

    .tx_yzcheck_btn {
      background-color: #1eadf3;
      margin-left: 30px;
      height: 40px;
      color: #ffffff;
      width: 120px;
      border-radius: 20px;
    }
  </style>
</head>

<body>
  <jsp:include page="/jsp/yunjing/txform_head.jsp" flush="true">
    <jsp:param name="tx_module" value="3" />
  </jsp:include>

  <div class="tx_container noprint" style="min-width: 1314px;">
    <div class="tx_content noprint">
      <ul class="tx_yz_searchul">
        <li id="pbyztime_li">
          <div class="tx_yz_searchword">查询日期</div>

          <div class="tx_datetime_div">
            <input type="text" name="yzstart_date" class="form-control tx_input_datetime form_datetime_ymd" value="" onchange="getjllist();"
              readonly="readonly" />
            <span class="glyphicon glyphicon-calendar" style="color: #4579C5"></span>&nbsp;
          </div>

          <ul class="tx_daytime_typeul">
            <li style="color: #4c7ec7;">
              <input type="radio" name="yzdaytime" class="tx_yzdaytime" value="" data-desc="全天" checked="checked" style="line-height: 40px;"
              />
              <img src="image/yunjing/all_day.png" />&nbsp;全天&nbsp;
              <span class="day_total_num">(${pbhznum.total_num})</span>
            </li>
            <li style="color:#ef762e;">
              <input type="radio" name="yzdaytime" class="tx_yzdaytime" value="0" data-desc="上午" />
              <img src="image/yunjing/am.png" />&nbsp;上午&nbsp;
              <span class="day_am_num">(${pbhznum.am_num})</span>
            </li>
            <li style="color:#f27767; ">
              <input type="radio" name="yzdaytime" class="tx_yzdaytime" value="1" data-desc="下午" style="color: red;background: green;"
              />
              <img src="image/yunjing/pm.png" />&nbsp;下午&nbsp;
              <span class="day_pm_num">(${pbhznum.pm_num})</span>
            </li>
            <li style="color:#8a97aa; ">
              <input type="radio" name="yzdaytime" class="tx_yzdaytime" value="2" data-desc="晚上" style="color: red;background: green;"
              />
              <img src="image/yunjing/night.png" />&nbsp;晚上&nbsp;
              <span class="day_night_num">(${pbhznum.night_num})</span>
            </li>
          </ul>
        </li>
        <li>
          <div class="col-md-6 col-lg-6" style="padding: 0px;">
            <ul class="tx_label_ul">
              <li data-id="1" class="tx_label_liactive">透析耗材</li>
              <li data-id="2">抗凝剂</li>
              <li data-id="3">药品</li>
            </ul>
          </div>
          <div class="col-md-6 col-lg-6" style="padding: 0px;text-align: right;">
            <!-- <button type="button" class="btn btn-danger tx_peiyao_btn" onclick="" ><img src="image/yunjing/print.png" alt="" />&nbsp;配药</button>
                   <button type="button" class="btn btn-info tx_yzcheck_btn" onclick="" ><img src="image/yunjing/doctor_advice_check.png" alt="" />&nbsp;核对</button> 
                    -->
            <button type="button" class="btn btn-success tx_print_btn" onclick="txpreprint();">
              <img src="image/yunjing/print.png" alt="" />&nbsp;打印</button>
            <button type="button" class="btn btn-info tx_wxpush_btn" onclick="precountpage();">
              <img src="image/yunjing/wechat.png" alt="" />&nbsp;统计</button>

          </div>
        </li>
      </ul>

      <table class="table table-striped yzprint_table" id="pbyztable">
        <thead>
          <tr class="print_tr" style="display: none;position: relative;">
            <td colspan="12" align="center">
              <h4 class="print_title">统计表</h4>
              <div class="print_date" style="float: right;"></div>
            </td>
          </tr>
          <tr data-id="1" class="txpre_title">
            <td width="20px" class="noprint">
              <input type="checkbox" class="check_all" value="" />
            </td>
            <td width="50px">序号</td>
            <td width="80px">透析机</td>
            <td width="90px">姓名</td>
            <td width="100px">血透器</td>
            <td width="100px">血滤器</td>
            <td width="100px">灌流器</td>
            <td width="80px">透析液钙</td>
            <td>上机换药包（个）</td>
            <td width="">下机换药包（个）</td>
            <td>內瘘穿刺包（个）</td>
            <td width="80px">穿刺针</td>
          </tr>

          <tr data-id="2" class="txpre_title hidden">
            <td width="20px" class="noprint">
              <input type="checkbox" class="check_all" value="" />
            </td>
            <td width="50px">序号</td>
            <td width="80px">透析机</td>
            <td width="">姓名</td>
            <td width="">抗凝剂(首剂)(维持)(总量)</td>
            <td width="">封管液(份)</td>
          </tr>

          <tr data-id="3" class="txpre_title hidden">
            <td width="20px" class="noprint">
              <input type="checkbox" class="check_all" value="" />
            </td>
            <td width="50px">序号</td>
            <td width="80px">透析机</td>
            <td width="">姓名</td>
            <td width="">促红素(推送)</td>
            <td width="">促红素(医嘱)</td>
            <td width="">左卡尼汀(推送)</td>
            <td width="">左卡尼汀(医嘱)</td>
          </tr>

        </thead>
        <tbody><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>1</td> <td>A1</td> <td>王母娘娘</td> <td>BLS514SD</td> <td></td> <td></td><td>1.35</td> <td></td> <td></td>  <td>1</td> <td>V锐针</td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>2</td> <td>1</td> <td>杨照样</td> <td></td> <td>FB-170U</td> <td></td><td>2</td> <td></td> <td></td>  <td>1</td> <td>A钝针</td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>3</td> <td>1</td> <td>李易</td> <td>SF-15G</td> <td></td> <td></td><td>/</td> <td>1</td> <td>1</td>  <td></td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>4</td> <td>2</td> <td>别小峰</td> <td>A1</td> <td>/</td> <td>HA330</td><td>5</td> <td></td> <td></td>  <td></td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>5</td> <td>2</td> <td>领导</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>6</td> <td>3</td> <td>天天</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td></td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>7</td> <td>3</td> <td>郑炳为</td> <td>BLS514SD</td> <td></td> <td></td><td>1.35</td> <td>1</td> <td>1</td>  <td></td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>8</td> <td>4</td> <td>齐秀英</td> <td>BLS514SD</td> <td></td> <td>HA130</td><td>2.2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>9</td> <td>5</td> <td>李四四</td> <td>/</td> <td>FB-170U</td> <td>/</td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>10</td> <td>5</td> <td>蜡笔小新</td> <td>饿了</td> <td></td> <td></td><td>1.35</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>11</td> <td>5</td> <td>王大拿</td> <td></td> <td></td> <td></td><td></td> <td></td> <td></td>  <td></td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>12</td> <td>6</td> <td>邓少斌</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td>1</td> <td>1</td>  <td></td> <td>V钝针</td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>13</td> <td>6</td> <td>98</td> <td>lg</td> <td>/</td> <td>/</td><td>1.35</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>14</td> <td>6</td> <td>速度</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>15</td> <td>6</td> <td>郭素英</td> <td>BLS514SD</td> <td></td> <td></td><td>234</td> <td></td> <td></td>  <td>1</td> <td>V锐针</td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>16</td> <td>7</td> <td>此次</td> <td></td> <td></td> <td></td><td></td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>17</td> <td>7</td> <td>测试专用</td> <td></td> <td>FB-170U</td> <td></td><td>2</td> <td></td> <td></td>  <td></td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>18</td> <td>7</td> <td>姚明清</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td></td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>19</td> <td>8</td> <td>看看</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>20</td> <td>9</td> <td>看看看</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>21</td> <td>11</td> <td>李四</td> <td>BLS514SD</td> <td>/</td> <td>/</td><td>1.35</td> <td></td> <td></td>  <td></td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>22</td> <td>12</td> <td>如同</td> <td></td> <td></td> <td>HA130</td><td></td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>23</td> <td>12</td> <td>尚虎雄</td> <td>BLS514SD</td> <td></td> <td></td><td>1.35</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>24</td> <td>12</td> <td>李桂英</td> <td></td> <td>FB-170U</td> <td></td><td>1.5</td> <td>1</td> <td>1</td>  <td></td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>25</td> <td>41</td> <td>格罗玛什</td> <td>/</td> <td>FB-170U</td> <td>/</td><td>211</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>26</td> <td>42</td> <td>销售演示</td> <td>BLS514SD</td> <td></td> <td></td><td>1.35</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>27</td> <td>42</td> <td>张拴明</td> <td>lg</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>28</td> <td>46</td> <td>李秋丽</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>29</td> <td>51</td> <td>水伟强</td> <td>BLS514SD</td> <td></td> <td>HA130</td><td>2.2</td> <td></td> <td></td>  <td></td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>30</td> <td>51</td> <td>端午</td> <td>BLS514SD</td> <td></td> <td></td><td>1.25</td> <td></td> <td></td>  <td></td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>31</td> <td>51</td> <td>杨春荣</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>32</td> <td>511</td> <td>刘江平</td> <td>BLS514SD</td> <td></td> <td></td><td>1.25</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>33</td> <td>511</td> <td>王贵祥</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>34</td> <td>511</td> <td>杨铁巷</td> <td></td> <td>HF-15SD</td> <td></td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>35</td> <td>777</td> <td>李希</td> <td>BLS514SD</td> <td>/</td> <td>/</td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>36</td> <td>777</td> <td>雷佳霖</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td>1</td> <td></td> </tr><tr><td class="noprint"><input type="checkbox" name="" class="txpre_checkbox"></td> <td>37</td> <td>998</td> <td>李吉田</td> <td>BLS514SD</td> <td></td> <td></td><td>2</td> <td></td> <td></td>  <td></td> <td></td> </tr></tbody>
      </table>

    </div>
  </div>


</body>
<style media="print" type="text/css">
  .noprint {
    visibility: hidden;
    display: none;
  }

  .print_tr {
    display: table-row !important;
    border-top: 1px solid #666;
  }

  hr {
    page-break-after: always;
  }

  .yzprint_table {
    width: 100%;
    width: 960px;
    margin: 0 auto;
    border: 1px solid #666;
  }

  .yzprint_table td {
    word-wrap: break-word;
    word-break: break-all;
    text-align: center;
    padding: 5px 0px 5px 0px;
    border-bottom: 1px solid #666;
    border-right: 1px solid #666;
  }
</style>
<script src="jquery.js"></script>
<script src="js/jqprint.js" type="text/javascript"></script>
<script>
  $(function () {
    init_datetimepicker_ymd();
    $("#pbyztime_li").find("input[name='yzstart_date']").val(getNowymdDate());
    getjllist();

  });

  //打印
  function txpreprint() {
    var tx_pdrq_type = $("ul.tx_daytime_typeul").find("input[name='yzdaytime'][type='radio']:checked").attr("data-desc");
    $(".print_title").text("统计表(" + tx_pdrq_type + ")");
    $(".print_date").text($("input[name='yzstart_date']").val());
    $.print("#pbyztable");
  }

  //记录全选
  $("input[type=checkbox].check_all").click(function () {
    if ($(this).is(':checked')) {
      $("input[type=checkbox].txpre_checkbox").prop("checked", true);
    } else {
      $("input[type=checkbox].txpre_checkbox").prop("checked", false);
    }
  });

  //切换页签
  $("ul.tx_label_ul>li").click(function () {
    $(this).addClass("tx_label_liactive").siblings().removeClass("tx_label_liactive");
    $("tr.txpre_title").addClass("hidden");
    $("#pbyztable>thead").find("tr.txpre_title[data-id='" + $(this).attr("data-id") + "']").removeClass("hidden");
    getjllist();
  });

  //排班时间radio选中
  $("input[type=radio].tx_yzdaytime").click(function () {
    getjllist();
  });

  //获取查询的结果记录 
  function getjllist() {
    var txtype = $("ul.tx_label_ul").find("li.tx_label_liactive").attr("data-id");
    var tx_pdrq = $("#pbyztime_li").find("input[name='yzstart_date']").val();
    var tx_pdrq_type = $("ul.tx_daytime_typeul").find("input[name='yzdaytime'][type='radio']:checked").val();
    $("#pbyztable tbody").empty();
    $("tr.txpre_title").find("input.check_all").prop("checked", false);
    $.ajaxSetup({
      async: false
    });
    $.post("user/tx_txpre.shtml", {
      txtype: txtype,
      tx_pdrq: tx_pdrq,
      tx_pdrq_type: tx_pdrq_type
    }, function (data) {
      if (data.pbhznum != null) {
        $("span.day_total_num").text("(" + data.pbhznum.total_num + ")");
        $("span.day_am_num").text("(" + data.pbhznum.am_num + ")");
        $("span.day_pm_num").text("(" + data.pbhznum.pm_num + ")");
        $("span.day_night_num").text("(" + data.pbhznum.night_num + ")");
      }
      switch (txtype) {
        case "1":
          if (data.res == null || data.res.length == 0) {
            $("#pbyztable>tbody").append(
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>"
            );
            return false;
          }
          $.each(data.res, function (index, item) {
            $("#pbyztable>tbody").append(
              "<tr>" +
              "<td class='noprint'><input type='checkbox' name='' class='txpre_checkbox' /></td> <td>" + (
                index + 1) + "</td> <td>" + item.tx_txj_id + "</td> <td>" + item.tx_name + "</td> <td>" + (
                item.tx_xtq_id == null ? "" : item.tx_xtq_id) + "</td> <td>" + (item.tx_xlq_id == null ? "" :
                item.tx_xlq_id) + "</td> <td>" + (item.tx_glq_id == null ? "" : item.tx_glq_id) + "</td>" +
              "<td>" + (item.tx_txycf_gai == null ? "" : item.tx_txycf_gai) + "</td> <td>" + item.tx_sjhyb +
              "</td> <td>" + item.tx_xjhyb + "</td>  <td>" + item.tx_nlccb + "</td> <td>" + (item.tx_ccz ==
                null ? "" : item.tx_ccz) + "</td> " +
              "</tr>"
            );
          });
          break;
        case "2":
          if (data.res == null || data.res.length == 0) {
            $("#pbyztable>tbody").append(
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>"
            );
            return false;
          }
          $.each(data.res, function (index, item) {
            $("#pbyztable>tbody").append(
              "<tr>" +
              "<td class='noprint'><input type='checkbox' name='' class='txpre_checkbox' /></td> <td>" + (
                index + 1) + "</td> <td>" + item.tx_txj_id + "</td> <td>" + item.tx_name + "</td> <td>" + (
                item.tx_knj_id == null ? "" : item.tx_knj_id) + "" + ((item.tx_sj == null || item.tx_sj == "") ?
                "" : "(" + item.tx_sj + ")") + "" + ((item.tx_weichi == null || item.tx_weichi == "") ? "" :
                "(" + item.tx_weichi + ")") + "" + ((item.tx_zl == null || item.tx_zl == "") ? "" : "(" +
                item.tx_zl + ")") + "</td> <td>" + item.tx_fgy + "</td> " +
              "</tr>"
            );
          });
          break;
        case "3":
          if (data.res == null || data.res.length == 0) {
            $("#pbyztable>tbody").append(
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>" +
              "<tr><td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td></tr>"
            );
            return false;
          }
          $.each(data.res, function (index, item) {
            $("#pbyztable>tbody").append(
              "<tr>" +
              "<td class='noprint'><input type='checkbox' name='' class='txpre_checkbox' /></td> <td>" + (
                index + 1) + "</td> <td>" + item.tx_txj_id + "</td> <td>" + (item.tx_name == null ? "" : item
                .tx_name) + "</td> <td>" + (item.pchs_tx_advicedescript == null ? "" : item.pchs_tx_advicedescript) +
              "</td> <td>" + (item.chs_tx_advicedescript == null ? "" : item.chs_tx_advicedescript) +
              "</td> <td>" + (item.pzknt_tx_advicedescript == null ? "" : item.pzknt_tx_advicedescript) +
              "</td> <td>" + (item.zknt_tx_advicedescript == null ? "" : item.zknt_tx_advicedescript) +
              "</td>" +
              "</tr>"
            );
          });
          break;
        default:
          break;
      }
    });
  }

  var precount_index = null;

  function precountpage() {
    var tx_pdrq = $("#pbyztime_li").find("input[name='yzstart_date']").val();
    var tx_pdrq_type = $("ul.tx_daytime_typeul").find("input[name='yzdaytime'][type='radio']:checked").val();
    precount_index = layer.open({
      title: "统计表",
      type: 2,
      skin: 'layui-layer-txform',
      area: ["600px", "90%"],
      closeBtn: 1,
      shadeClose: true,
      content: 'user/txform_precount.shtml?tx_pdrq=' + tx_pdrq + '&tx_pdrq_type=' + tx_pdrq_type
    });
  }


  function init_datetimepicker_ymd() {
    $(".form_datetime_ymd").datetimepicker({
      format: 'yyyy-mm-dd',
      language: 'zh-CN',
      weekStart: 1,
      todayBtn: 1,
      autoclose: 1,
      todayHighlight: 1,
      startView: 2,
      minView: 2,
      forceParse: 0,
      keyboardNavigation: 1,
      forceParse: 1
    });
  }
</script>

</html>